import request from '@/utils/request'

// 查询发货单列表
export function listSend(query) {
    return request({
        url: '/sales/send/list',
        method: 'post',
        data: query
    })
}

// 查询发货单详细
export function getSend(id) {
    return request({
        url: '/sales/send/' + id,
        method: 'get'
    })
}

// 新增发货单
export function addSend(data) {
    return request({
        url: '/sales/send/add',
        method: 'post',
        data: data
    })
}

// 修改发货单
export function updateSend(data) {
    return request({
        url: '/sales/send/update',
        method: 'post',
        data: data
    })
}

// 删除发货单
export function delSend(id) {
    return request({
        url: '/sales/send/delete/' + id,
        method: 'post'
    })
}

// 同步物流
export function syncLogistics(id) {
    return request({
        url: '/sales/send/syncLogistics/' + id,
        method: 'post'
    })
}

// 批量更新物流信息
export function updateLogisticsBatch() {
    return request({
      url: '/sales/send/updateLogisticsByTask',
      method: 'post'
    })
  }

// 批量更新物流信息
export function update2BLogisticsBatch() {
    return request({
      url: '/sales/send/update2BLogisticsByTask',
      method: 'post'
    })
  }